<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>帐号列表</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="后台管理">
<meta name="description" content="后台管理。">
<meta name="author" content="yinqi">
<link href="{{asset('css/bootstrap.min.css')}}" rel="stylesheet">
<link href="{{asset('css/materialdesignicons.min.css')}}" rel="stylesheet">
<link href="{{asset('css/style.min.css')}}" rel="stylesheet">
</head>
  
<body>
<div class="container-fluid p-t-15">
  
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-toolbar clearfix">
          <form class="pull-right search-bar" method="get" action="#!" role="form">
            <div class="input-group">
              <div class="input-group-btn">
                <input type="hidden" name="search_field" id="search-field" value="title">
                <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                标题 <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                  <li> <a tabindex="-1" href="javascript:void(0)" data-field="title">标题</a> </li>
                  <li> <a tabindex="-1" href="javascript:void(0)" data-field="cat_name">栏目</a> </li>
                </ul>
              </div>
              <input type="text" class="form-control" value="" name="keyword" placeholder="请输入名称">
            </div>
          </form>
        </div>
        <div class="card-body">
          
          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                  <th>id</th>
                  <th>用户名</th>
                  <th>添加时间</th>
                  <th>编辑</th>
                </tr>
              </thead>
              <tbody>
                @foreach($admins as $admin)
                <tr>
                  <td>{{$admin->id}}</td>
                  <td>{{$admin->user_name}}</td>
                  <td>{{ date('Y-m-d H:i:s', $admin->add_time) }}</td>          
                  <td>
                    <div class="btn-group">
                      <a class="btn btn-xs btn-default" href="{{url('admin/admin_edit/'.$admin->id)}}" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                      <!-- <a class="btn btn-xs btn-default" href="{{url('admin/admin_del/'.$admin->id)}}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a> -->
                    </div>
                  </td>
                </tr>
                @endforeach           
              </tbody>
            </table>
          </div>
          {{ $admins->links() }}
 
        </div>
      </div>
    </div>
    
  </div>
  
</div>

<script type="text/javascript" src="{{asset('js/jquery.min.js')}}"></script>
<script type="text/javascript" src="{{asset('js/bootstrap.min.js')}}"></script>
<script type="text/javascript" src="{{asset('js/main.min.js')}}"></script>
<script type="text/javascript">
$(function(){
    $('.search-bar .dropdown-menu a').click(function() {
        var field = $(this).data('field') || '';
        $('#search-field').val(field);
        $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
});
</script>
</body>
</html>